package com.adderis.soft.domain.dao;

import java.util.List;

import com.adderis.soft.domain.model.Users;

/**
 * DAO for domain model class Users.
 * 
 * @see com.adderis.soft.domain.model.Users
 * @author Reda
 */
public interface IUsersDao {

	/**
	 * Persist a Users entity in the database
	 * 
	 * @param transientUsers
	 */
	public void persist(Users transientUsers);

	/**
	 * Remove a persisted Users from the database
	 * 
	 * @param persistentUsers
	 */
	public void remove(Users persistentUsers);

	/**
	 * Remove a persisted Users from the database
	 * 
	 * @param UsersId
	 */
	public void remove(Integer UsersId);

	/**
	 * Update a Users in the database
	 * 
	 * @param detachedUsers
	 * @return merged Users
	 */
	public Users merge(Users detachedUsers);

	/**
	 * Find a Users by id
	 * 
	 * @param id
	 * @return the found Users
	 */
	public Users findById(Integer id);

	/**
	 * Find a list of Users
	 * 
	 * @return the found Users
	 */
	public List<Users> findAll();

	/**
	 * Search Userss
	 * 
	 * @param searchString
	 * @return the found Users
	 */
	public List<Users> search(String searchString);
	
	/**
	 * 
	 * @param login
	 * @param password
	 * @return user
	 */
	
	public Users login(String login, String password);

}
